﻿namespace TetrisProject.GameObjects.Blocks
{
    using System;

    public class BlockI : GameObject
    {
        private static bool[,] image = new bool[,] 
        {
            { true, true, true, true }
        };

        private bool vertical;

        public BlockI(int coordY)
            : base(coordY, image)
        {
            this.vertical = true;
        }

        public override void Rotate()
        {
            base.Rotate();

            if (this.vertical)
            {
                this.topLeft += new MatrixCoords(0, 2);
            }
            else
            {
                this.topLeft -= new MatrixCoords(0, 2);
            }

            this.vertical = !this.vertical;
        }
    }
}
